package com.lagou.rpc.consumer.controller;

import com.lagou.rpc.api.IUserService;
import com.lagou.rpc.consumer.anno.RpcService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: jie.zhao
 * @create: 2021/05/18 12:19
 */
@RestController
public class UserController {

//    @Resource
    @RpcService
    IUserService iUserService;

    @GetMapping("/selectUser")
    public String selectUserByUserId(int userId){
        return iUserService.getById(userId).toString();
    }

}
